fix: restore editor preview responsiveness after export (#68)#69
fix: restore editor preview responsiveness after export (#68)#69Sameer2748 wants to merge 1 commit intowebadderall:mainfrom
Conversation
The Pixi.js canvas and video element in the editor preview panel could become "stalled" or "stale" after a heavy video export render. Because this is a long async process, the browser's Rendering/Pixi context sometimes fails to resume frame updates, leaving the preview frozen or unresponsive to interactions. Changes: - Added 'previewVersion' state to VideoEditor.tsx to drive component re-mounting. - Updated VideoEditor.tsx to increment 'previewVersion' in the finally block of the export flow (success, error, or cancel). - Applied 'previewVersion' to the key of the VideoPlayback component, forcing React to fully re-construct the preview context after each export. - Enhanced VideoPlayback.tsx to sync the internal time ref with the currentTime prop, ensuring the new player state is correctly seeked after re-mount. - Added a relayout() method to flush Pixi textures and force an immediate layout refresh for better responsiveness. Fixes webadderall#68
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment Tip CodeRabbit can scan for known vulnerabilities in your dependencies using OSV Scanner.OSV Scanner will automatically detect and report security vulnerabilities in your project's dependencies. No additional configuration is required. |
|
|
|
@Sameer2748 always try to keep info minimal, easy to read. Less AI Slop. |
|
I've trimmed down the description to be more concise. @gurpreetkaits |
|
I'll review this but next time don't submit PRs for issues already assigned to someone. |
Consider after redesign maybe. See if it doesn't conflict with that. |
Fixes #68.
The editor preview panel freezes after heavy video exports. This PR adds a
previewVersionstate to force a player re-mount on export completion or cancellation. This clears the stale rendering context without losing user changes (zooms/annotations).Video Demo:
https://github.com/user-attachments/assets/c6cc3e1f-ac56-4312-8558-7c57c0206b1b
Tested locally — works smoothly on multiple exports.